import ttkbootstrap as ttk
from code.util.db import sqlite_util as sqlite_db, mysql_util


# 弹出工人窗口
def pop_worker():
    popup = ttk.Toplevel()
    popup.title("工人空间")
    popup.geometry("400x400")

    table_name_entry = ttk.Entry(popup)
    table_name_entry.insert(0, "输入数据源表名")  # 手动将默认值插入输入框
    table_name_entry.pack()

    button_exe = ttk.Button(popup, text="执行", command=lambda: build_doc(table_name_entry))
    button_exe.pack()

def build_doc(table_name_entry):
    mysql_util.select_field(table_name_entry)

